home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17165 < prev    next >
Encoding:
Text File  |  1996-08-05  |  734 b   |  26 lines

  1. Newsgroups: comp.lang.c++
  2. Path: presby.edu!jtbell
  3. From: jtbell@presby.edu (Jon Bell)
  4. Subject: Re: using pow ( power command (n^m))
  5. Message-ID: <Dpu1sL.22I@presby.edu>
  6. Date: Sun, 14 Apr 1996 03:31:33 GMT
  7. References: <00001a81+0000b20f@msn.com>
  8. Organization: Presbyterian College, Clinton, South Carolina USA
  9.  
  10.  MATTHEW MALMIN <MTROY@msn.com> wrote:
  11. >how do you use the pow command?
  12.  
  13. 'pow' is a math library function, not a "command" (or "statement" as we 
  14. prefer to call them).
  15.  
  16. >i want to do this 
  17. >total = total ^ num;
  18. >how do i do this command in c++
  19.  
  20. Try
  21.     total = pow (total, num)
  22.  
  23. -- 
  24. Jon Bell <jtbell@presby.edu>                        Presbyterian College
  25. Dept. of Physics and Computer Science        Clinton, South Carolina USA
  26.